const express = require('express')
const router = express.Router();
const db = require('../../utils/db')
router.get('/queue', function (req, res) {
    let mysql = `SELECT * FROM line_up 
    JOIN customer ON line_up.line_username=customer.customer_id
    JOIN USER ON line_up.line_name=user.user_id
    JOIN table_area ON line_up.line_table_size=table_area.table_id`
    db(mysql, null, function (err, data) {
        if (err) {
            return res.json({
                code: 500,
                msg: '数据失败'
            })
        }
        res.json({
            code: 200,
            msg: '数据成功',
            data: data
        })
    })
})
module.exports = router